package com.example.shop.shops.controller;


import com.example.shop.shops.domain.Log;
import com.example.shop.shops.service.LogService;
import com.example.shop.util.PageList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.bind.annotation.*;

/**
 * 日志打印
 */
@RestController
@CrossOrigin(origins = "*", maxAge = 3600)
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;

    @GetMapping("/{shopId}")
    public PageList<Log> getList(@PathVariable Long shopId) {
        return logService.getList(shopId);
    }
}
